<?php
header("Content-type: image/svg+xml");
echo '<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 
<script xlink:href="test.js" />
<g id="texte">';  

for($i=0;$i<50;$i++){
	srand(time());
	$x = rand(0, (300*$i));
	$y = rand(0, 500);
	
    if ($i%2 == 1)
    {
		$color = "green";
    }
    else
    {
		$color = "pink";
    }
	echo '<text id="texte'.$i.'" x="'.$x.'" y="'.$y.'"   style="stroke:'.$color.';fill:'.$color.';fontsize:70;" 
	width="100" height="100">
		Hello world !
	</text> ';    
    
}


echo '</g>
	<rect onmouseover="move()" fill="blue" x="200" y="50" width="50" height="50"/>
</svg> 
 ';

?>